package controllers;

import static org.junit.Assert.*;
import junit.framework.Assert;

import org.junit.Test;
import client.*;
import client.gui.*;
import client.gui.panels.*;
import server.*;

public class LoginControllerTest {
	private Login loginPanel = new Login();
	private LoginController lc = new LoginController(new MainFrame(new MainController("localhost", 5555)), loginPanel);;

	@Test
	public void testAction1() {
		lc.action();
		Assert.assertFalse(lc.getFlag());
	}
	
	@Test
	public void testAction2() {
		loginPanel.setUsername("317226215");
		loginPanel.setPassword("qazxsw");
		lc.action();
		Assert.assertTrue(lc.getFlag());
	}

}
